<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var c = console.log.bind(document)
        var x = 121
        var isPalindrome = function(x) {
            var s =String(x)
            var arr = ''
            for(var i=s.length-1;i>=0;i--){
                arr+=s[i]
            }
            var d = Number(arr)
            if(d === x) {
                return true
            }else {
                return false
            }
            // x = -121
            // x = String(x)
            // var s = Number(String(x).split('').reverse().join(''))
            // if(s==NaN){
            //     return false
            //     if(x==s){
            //         c(true)
            //         return true
            //     }else{
            //         c(false)
            //         return false
            //     }
            // } 

        }(x);
    </script>
</body>
</html>